package com.scsj.supermarket.adapter;

import android.support.annotation.Nullable;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.scsj.supermarket.R;
import com.scsj.supermarket.bean.ShopListBaseBean;

import java.util.List;

/**
 *  首页商品列表
 */

public class ShopListBaseAdapter extends BaseQuickAdapter<ShopListBaseBean.ShopListBase,BaseViewHolder> {

    public ShopListBaseAdapter(List data) {
        super(R.layout.item_shop_list_base_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShopListBaseBean.ShopListBase item) {

//            Glide.with(mContext).load(item.getIndex_icon_iv());
            helper.setText(R.id.index_address_tv,item.getIndex_address_tv());
            helper.setText(R.id.index_name_tv,item.getIndex_name_tv());
            helper.setText(R.id.index_func_tv,item.getIndex_func_tv());
            helper.setText(R.id.index_num_tv,item.getIndex_num_tv());
            helper.setText(R.id.index_collect_tv,item.getIndex_collect_tv());
            helper.setText(R.id.index_price_tv,item.getIndex_price_tv());
            helper.setText(R.id.index_oldprice_tv,item.getIndex_oldprice_tv());


    }
}
